<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@1.6/lib/index.css">
		<script src="js/vue.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/vant.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="html5plus://ready"></script>
		
	</head>
	<body>
		<div id="app">			
			<van-tabbar v-model="active" active-color="red" v-show="isShow" @change="tz">
				<van-tabbar-item icon="shop-o">首页</van-tabbar-item>
				<van-tabbar-item icon="apps-o">分类</van-tabbar-item>
				<van-tabbar-item icon="cart-o">购物车</van-tabbar-item>
				<van-tabbar-item icon="contact">个人中心</van-tabbar-item>
			</van-tabbar>
			
		</div>
		<script type="text/javascript">
			var vm = new Vue({
				el: "#app",
				data: {
					active: 0,
					views: [
						{
						name: "home",
						url:"view/home.html"
						}, 
						{
						name: "fenl",
						url:"view/classify.html"
						}, 
						{
						name: "gwc",
						url:"view/shoppingtrolley.html"
						}, 
						{
						name: "grzx",
						url:"view/presonal-center.html"
						}				
					],
					isShow:true
				},
				created:function(){
					
				},
				mounted:function(){
					_this=this;
					window.addEventListener("resize",function(){
						_this.isShow=!_this.isShow
						
					})
					var rwobj = plus.webview.currentWebview();
					for(var i=0;i<this.views.length;i++){
						var tempWebView=plus.webview.create(this.views[i].url,this.views[i].name,{
							top:"0px",
							bottom:"50px",
							scrollIndicator:"none",
							zindex:1
						})
						rwobj.append(tempWebView);
					}
					plus.webview.show(this.views[0].name,"slide-in-right");
				},
				methods:{
					tz:function(){
						plus.webview.show(this.views[this.active].name,"slide-in-right");
					}
				}
			})
		</script>
	</body>
</html>


